<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>信息</title>
</head>
<body>
<form action="upload.php" method="post" enctype="multipart/form-data">

    <input type="file" name="pic[]" id="file" multiple onchange="abc(event)"/>
    <input type="button" name="" id="" value="提交" />
</form>

<img id="imgBase" width="200px" height="200px">
<img id="img1" width="100px" height="100px">
<img id="img2" width="50px" height="50px">
</body>
<script type="text/javascript">
    function abc(event){
        var files = event.target.files;
        var URL = window.URL || window.webkitURL;
        var imgURL = URL.createObjectURL(files[0]);
        document.getElementById('imgBase').src = imgURL;
        document.getElementById('img1').src = imgURL;
        document.getElementById('img2').src = imgURL;
    }
</script>
</html>
